home *** CD-ROM | disk | FTP | other *** search
- /*
- ----------------------------------------------------------------------------
- Name To Sculpt Sequence
- Filenames with the extension .1, .10, .100, .1000
- and with the extension of .0001, .0010, .0100, .1000
- Will be renamed with the extension: .0001, .0010, .0100, .1000
-
- Host address: COMMAND.
- Written by Jan Van Overbeke, 3-DEE, ©1993.
- Read the AREXX-Scripti doc, for more info about operation and rights!
- ----------------------------------------------------------------------------
- */
-
- arg source
- dest=source
- if ~exists(dest)|dest='' then do
- say 'Unable to find file !!'
- say 'See Ya......'
- say ''
- exit
- end
-
- exttwopos=lastpos('.',dest)
- if ~exttwopos<length(dest)-5 then do
- extnumber=right(dest,length(dest)-exttwopos)
- if (extnumber<0)|(extnumber>9999) then do
- say 'Invalid filename: Wrong extension !!'
- say 'See Ya...'
- say ''
- exit
- end
- dest=delstr(dest,exttwopos+1)||extnumber||'.image'
- say 'Renaming: 'source
- say 'as: 'dest
- say ''
- doscommand='rename >NIL: 'source' as 'dest
- address COMMAND doscommand
- exit
- end
-
- say 'Extension too large !!!!'
- say 'No longer than 4 digits!'
- say 'See Ya...'
- say ''
- exit
-